package moutum.com.dagger2android.di;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import frame.m.com.mylibrary.http.HttpUtil;
import frame.m.com.mylibrary.http.RetrofitUtil;

/**
 * Created by Ma.Chong on 2017/11/21.
 */

@Module
public class ApiModule {
    @Provides
    public Api provideApi() {
        return new RetrofitUtil<Api>().getAPI(Api.class);
    }

    @Provides
    public RetrofitUtil provideRetrofitUtil() {
        return new RetrofitUtil<Api>();
    }

    @Provides
    public HttpUtil provideHttpUtil() {
        return HttpUtil.getInstance();
    }

}
